package igou.togogo.controller;

import igou.togogo.pojo.EgouResult;
import igou.togogo.service.ISkuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/sku")
public class SkuController {

    @Autowired
    ISkuService skuService;

    @RequestMapping("/{id}")
    @ResponseBody
    public EgouResult getById(@PathVariable("id") Integer id){
        return skuService.getById(id);
    }
}
